.TH E1432_SET_RMS_SPAN 3 E1432
.SH NAME
.nf
e1432_set_rms_span \- Set rms measurement span
e1432_get_rms_span \- Get rms measurement span
e1432_set_peak_span \- Set peak measurement span
e1432_get_peak_span \- Get peak measurement span
e1432_set_hpf_span \- Set hpf measurement span
e1432_get_hpf_span \- Get hpf measurement span
.fi
.IX e1432_set_rms_span(3) 3
.IX e1432_get_rms_span(3) 3
.IX e1432_set_peak_span(3) 3
.IX e1432_get_peak_span(3) 3
.IX e1432_set_hpf_span(3) 3
.IX e1432_get_hpf_span(3) 3
.SH SYNOPSIS
.cS
SHORTSIZ16 e1432_set_rms_span(E1432ID hw, SHORTSIZ16 ID, FLOATSIZ32 span)
SHORTSIZ16 e1432_get_rms_span(E1432ID hw, SHORTSIZ16 ID, FLOATSIZ32 *span)
SHORTSIZ16 e1432_set_peak_span(E1432ID hw, SHORTSIZ16 ID, FLOATSIZ32 span)
SHORTSIZ16 e1432_get_peak_span(E1432ID hw, SHORTSIZ16 ID, FLOATSIZ32 *span)
SHORTSIZ16 e1432_set_hpf_span(E1432ID hw, SHORTSIZ16 ID, FLOATSIZ32 span)
SHORTSIZ16 e1432_get_hpf_span(E1432ID hw, SHORTSIZ16 ID, FLOATSIZ32 *span)
.cE
.SH DESCRIPTION
The E1432 option 204 4-channel 51.2 kHz input SCA is the only SCA to
support these functions.

\fIe1432_set_rms_span\fR selects the rms detector measurement span.
\fIe1432_set_peak_span\fR selects the peak detector measurement span.
\fIe1432_set_hpf_span\fR selects the highpass filter span.

The valid values for \fIspan\fR depend of the current clock frequency,
which is set by \fIe1432_set_clock_freq\fR.  The clock frequency
should be set before setting the span.  Normally, the maximum valid
span is max_span = clock_freq/2.56.  Valid spans are max_span divided
by powers of two, and max_span divided by five and by powers of two.
The ratio between the span and the max_span is called the decimation
factor.

For \fIe1432_set_rms_span\fR or \fIe1432_set_peak_span\fR, if \fIspan\fR
is less than 0, then the high pass filter is selected for input to that detector.
If \fIspan\fR equals 0 then that detector is unused.

For \fIe1432_set_hpf_span\fR, if \fIspan\fR is 0, the max_span is used. 
The high pass filter calculation is done only if selected by
\fIe1432_set_rms_span\fR or \fIe1432_set_peak_span\fR above.

\fBNOTE:\fR  When in order tracking mode the max_span is limited because the
order tracking algorithm uses data oversampled by two.
The max_span=clock_freq/5.12 or when prescaled spans are used the
max_span=clock_freq/(5*5.12).

For the E1432 option 204, 51.2 kHz input SCA, the maximum number of
decimate-by-two passes allowed is twelve, so the maximum decimation
factor is 5*2^12 and the minimum valid span is clock_freq/(2.56*5*2^12).
If the clock frequency is larger than 51.2 kHz, then the E1432 option 204
input channel is unable to do decimation correctly.


\fIe1432_get_rms_span\fR,  \fIe1432_get_peak_span\fR, and
\fIe1432_get_hpf_span\fR return the current span in Hertz.  All channels
of a module have the same span settings.

This parameter is a "global" parameter.  It applies to an entire E1432
module rather than to one of its channels.  The \fIID\fR parameter is
used only to identify which module the function applies to, and all
channels in that module will report the same value for this parameter.

\fIhw\fR must be the result of a successful call to
\fIe1432_assign_channel_numbers\fR, and specifies the group of
hardware to talk to.

\fIID\fR is either the ID of a group of channels that was obtained with a
call to \fIe1432_create_channel_group\fR, or the ID of a single
channel.

\fIspan\fR is the desired span, in Hz.  It is rounded up to the next
larger valid span.

Because the algorithm for rounding the span is somewhat complicated,
it is generally a good idea to call a get_span after setting the
span.  This will ensure that the host application knows the actual
span that is being used.

.SH "RESET VALUE"
After a reset, each span is set to the maximum legal span.
.SH "RETURN VALUE"
Return 0 if successful, a (negative) error number otherwise.
.SH "SEE ALSO"
.na
e1432_set_span, e1432_set_coupling_freq, e1432_set_rms_decay_time, e1432_get_peak_hold_time, e1432_set_clock_freq, e1432_get_span_limits
.ad

